<?=view('header.html')?>
<section class="section">
	<div class="server">
		<table class="layui-table table-hover" width="100%">

			<thead>
				<tr>
					<th>环境检测</th>
					<th>推荐配置</th>
					<th>当前状态</th>
					<th>最低要求</th>
				</tr>
			</thead>

			<tr>
				<td>操作系统</td>
				<td><?=$recommendEnvironment['os'];?></td>
				<td>
					<?php if (true ==  $currentEnvironment['os_ischeck']):?>
					<span class="correct_span"><i class="layui-icon layui-icon-face-smile-b"></i></span>
					<?php else:?>
					<span class="error_span layui-bg-red"><i class="layui-icon layui-icon-face-cry"></i></span>
					<?php endif?>
					<?=$currentEnvironment['os'];?>
				</td>
				<td><?=$lowestEnvironment['os'];?></td>
			</tr>
			<tr>
				<td>PHP版本</td>
				<td><?=$recommendEnvironment['version'];?></td>
				<td>
					<?php if (true ==  $currentEnvironment['version_ischeck']):?>
					<span class="correct_span"><i class="layui-icon layui-icon-face-smile-b"></i></span>
					<?php else:?><span class="error_span layui-bg-red"><i class="layui-icon layui-icon-face-cry"></i></span>
					<?php endif?>
					<?=$currentEnvironment['version'];?>
				</td>
				<td><?=$lowestEnvironment['version'];?></td>
			</tr>
			<tr>
				<td>JSON</td>
				<td><?=$recommendEnvironment['json'];?></td>
				<td>
					<?php if (true ==  $currentEnvironment['json']):?>
					<span class="correct_span"><i class="layui-icon layui-icon-face-smile-b"></i></span>
					<?php else:?>
					<span class="error_span layui-bg-red"><i class="layui-icon layui-icon-face-cry"></i></span>
					<?php endif?>
					支持
				</td>
				<td><?=$lowestEnvironment['json'];?></td>
			</tr>
			<tr>
				<td>Mysql版本（client）</td>
				<td><?=$recommendEnvironment['mysql'];?></td>
				<td>
					<?php if (true ==  $currentEnvironment['mysql_ischeck']):?>
					<span class="correct_span"><i class="layui-icon layui-icon-face-smile-b"></i></span>
					<?php else:?><span class="error_span layui-bg-red"><i class="layui-icon layui-icon-face-cry"></i></span>
					<?php endif?>
					<?=$currentEnvironment['mysql'];?>
				</td>
				<td><?=$lowestEnvironment['mysql'];?></td>
			</tr>
			<tr>
				<td>PDO_Mysql</td>
				<td><?=$recommendEnvironment['pdo_mysql'];?></td>
				<td>
					<?php if (true ==  $currentEnvironment['pdo_mysql_ischeck']):?>
					<span class="correct_span"><i class="layui-icon layui-icon-face-smile-b"></i></span>已安装
					<?php else:?>
					<span class="error_span layui-bg-red"><i class="layui-icon layui-icon-face-cry"></i></span>未安装
					<?php endif?>
				</td>
				<td><?=$lowestEnvironment['pdo_mysql'];?></td>
			</tr>
			<tr>
				<td>附件上传</td>
				<td><?=$recommendEnvironment['upload'];?></td>
				<td>
					<?php if (true ==  $currentEnvironment['upload_ischeck']):?>
					<span class="correct_span"><i class="layui-icon layui-icon-face-smile-b"></i></span>
					<?php else:?>
					<span class="error_span layui-bg-red"><i class="layui-icon layui-icon-face-cry"></i></span>
					<?php endif?>
					<?=$currentEnvironment['upload'];?>
				</td>
				<td><?=$lowestEnvironment['upload'];?></td>
			</tr>
			<tr>
				<td>磁盘空间</td>
				<td><?=$recommendEnvironment['space'];?></td>
				<td>
					<?php if (true ==  $currentEnvironment['space_ischeck']):?>
					<span class="correct_span"><i class="layui-icon layui-icon-face-smile-b"></i></span>
					<?php else:?>
					<span class="error_span layui-bg-red"><i class="layui-icon layui-icon-face-cry"></i></span>
					<?php endif?>
					<?=$currentEnvironment['space'];?>
				</td>
				<td><?=$lowestEnvironment['space'];?></td>
			</tr>
		</table>

		<table class="layui-table table-hover" width="100%">
			<tr>
				<td class="td1">目录、文件权限检查</td>
				<td class="td1" width="25%">当前状态</td>
				<td class="td1" width="25%">所需状态</td>
			</tr>
			<?php foreach ($writeAble as $key=>$value):?>
			<tr>
				<td><?=$key;?></td>
				<td>
					<?php if (false == $value):?>
					<span class="error_span layui-bg-red"><i class="layui-icon layui-icon-face-cry"></i></span>不可写或不存在
					<?php else:?>
					<span class="correct_span"><i class="layui-icon layui-icon-face-smile-b"></i></span>可写
					<?php endif?>
				</td>
				<td>可写</td>
			</tr>
			<?php endforeach?>
		</table>
	</div>
	<div class="bottom tac">
		<a href="<?=url('install/index', ['step' => $step])?>" class="layui-btn layui-btn-danger">重新检测</a>
		<a href="<?=url('install/index', ['step' => $step+1])?>" class="layui-btn layui-btn-blue">下一步</a>
	</div>
</section>
<?=view('footer.html')?>
